package liangtWorkSpace.Observer.version2;

/**
 * @ClassName Cliend
 * @Description : 功能说明
 * @Author : LiangT
 * @Date : 2020/4/16 18:44
 */

/**
 * 傻等--观察
 */
public class Cliend {
    private boolean cry = false;

    public boolean isCry(){return cry;};

    public void weakUp(){
        System.out.println("crying ....");
        cry = true;
    }

    public static void main(String[] args) {
        Cliend cliend = new Cliend();
        while (!cliend.isCry()){
            try {
                Thread.sleep(1000);
            }catch (Exception e){
                e.printStackTrace();
            }
            cliend.weakUp();
            System.out.println("");
        }
    }
}
